//
//  YAYIAddHospitalCell.m
//  YAYIDoctor
//
//  Created by Veer on 16/5/16.
//
//

#import "YAYIAddHospitalCell.h"

@implementation YAYIAddHospitalCell

+ (instancetype)cellWith:(UITableView *)tablevie
{
    static NSString *cellID = @"YAYIEditPersonalInfoCell";
    
    YAYIAddHospitalCell *cell = [tablevie dequeueReusableCellWithIdentifier:cellID];
    
    if (nil == cell) {
        cell = [[YAYIAddHospitalCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self setupSubView];
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    //self.lineView.frame = CGRectMake(0, self.contentView.frame.size.height, SCREEN_width, 1);
    [self.tf mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_centerX).offset(-60);
        make.height.equalTo(self.contentView);
        make.right.equalTo(self).offset(-35);
        make.top.equalTo(self.contentView);
    }];
}


- (void)setupSubView
{
    self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    self.textLabel.font = [UIFont systemFontOfSize:16];
    self.textLabel.textColor = YAYIColor(80, 80, 80);
    
    // 添加输入框
    UITextField *tf = [[UITextField alloc] init];
    tf.font = [UIFont systemFontOfSize:15];
    tf.textColor = YAYIColor(69, 69, 69);
    //    tf.clearButtonMode = UITextFieldViewModeAlways;
    tf.placeholder = @"请选择";
    tf.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:tf];
    self.tf = tf;
    
}

@end
